package com.rdtravel.services;

import com.rdtravel.entities.Customer;

/**
 * Services for {@link com.rdtravel.entities.Customer} Entities
 * 
 * @author Hans
 * 
 */

public interface CustomersService {
	/**
	 * 
	 * @param customer
	 *            the {@link com.rdtravel.entities.Customer} to create
	 * @throws com.rdtravel.exceptions.CustomerAlreadyExitstException
	 *             if another user with the same username exists
	 */
	public void create(Customer customer);

	/**
	 * 
	 * @param id
	 *            the id of the {@link com.rdtravel.entities.Customer} to find
	 * @return the {@link com.rdtravel.entities.Customer} with this id<br/>
	 *         <code>null</code> if no {@link com.rdtravel.entities.Customer}
	 *         with this is id is found
	 */
	public Customer findById(long id);

	/**
	 * 
	 * @param username
	 *            the username of the {@link com.rdtravel.entities.Customer} to
	 *            find
	 * @return the {@link com.rdtravel.entities.Customer} with this username<br/>
	 *         <code>null</code> if no {@link com.rdtravel.entities.Customer}
	 *         with this username id is found
	 */

	public Customer findByUsername(String username);
}